<div ng-controller="inquiryRatifyController">
    
    <div class="bg-light lter b-b wrapper-sm">
        <h1 class="m-n font-thin h4">{{inquiryName}}</h1>
    </div>
    <div class="wrapper-sm">
        <div class="panel panel-default">
            <div class="panel-body">
                <form name="step1" id="inquiryForm" class="form-validation form-horizontal" novalidate>
                    <div class="form-group">
                        <div class="panel-heading font-bold m-t-n m-b-sm">
                            基本信息
                        </div>
                        <label class="col-lg-1 pull-left control-label">总询价单编号:</label>
                        <label class="col-lg-2 control-label text-left">{{inquiryId}}</label>
                        <label class="w-s pull-left control-label">子询价单编号:</label>
                        <label class="col-lg-2 control-label text-left">{{inquiryChildId}}</label>
                        <label class="w-s pull-left control-label m-l-n-md">下单时间:</label>
                        <label class="col-lg-2 control-label text-left">{{createTime}}</label>
                        <label class="w-s pull-left control-label">紧急程度<span class="text-danger">*</span></label>
                        <label class="control-label pull-left">{{urgency}}</label>
                        <div class="pull-left m-l-xs">
                            <select class="form-control input-sm" ng-model="urgencyUnit" name="urgencyUnit" ng-options="x.value as x.text for x in urgencyUnitDropDown" disabled="disabled" required id="urgencyUnit">
                                <option value="">请选择</option>
                            </select>
                        </div>
                        <label class="control-label m-l-xs">内回复</label>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-1 pull-left control-label">计划专员</label>
                        <label class="col-lg-2 control-label text-left">{{plannerName}}</label>
                        <label class="w-s pull-left control-label">商务专员<span class="text-danger">*</span>&nbsp</label>
                        <div class="col-lg-2">
                            <!--<select class="form-control input-sm" ng-model="businessOfficerId" name="businessOfficerId" id="businessOfficerId" ng-options="x.id as x.realName for x in businessOfficerList" ng-disabled="payDisable" required>
                                <option value="">请选择</option>
                            </select>-->
                            <label class="control-label pull-left">{{businessOfficerName}}</label>
                            <!--<input type="text" class="form-control input-sm" ng-model="businessOfficerName" required name="businessOfficerName" id="businessOfficerName" ng-disabled="payDisable">-->
                        </div>
                        <label class="w-s pull-left control-label">客服专员<span class="text-danger">*</span></label>
                        <div class="col-lg-2">
                            <!--<select class="form-control input-sm" ng-model="customerServiceOfficerId" name="customerServiceOfficerId" id="customerServiceOfficerId" ng-options="x.id as x.realName for x in customerServiceOfficerList" ng-disabled="payDisable" required>
                                <option value="">请选择</option>
                            </select>-->
                            <label class="control-label pull-left">{{customerServiceOfficerName}}</label>
                            <!--<input type="text" class="form-control input-sm" ng-model="customerServiceOfficerName" required name="customerServiceOfficerName" id="customerServiceOfficerName" ng-disabled="payDisable">-->
                        </div>
                        <label class="w-s pull-left control-label">调度专员<span class="text-danger">*</span></label>
                        <div class="col-lg-2">
                            <select ng-show="isShow" class="form-control input-sm" id="dispatchOfficerId" ng-model="dispatchOfficerId" name="dispatchOfficerId" ng-options="x.id as x.realName for x in dispatchOfficerList" ng-disabled="dispatchOfficerDis" required>
                                <option value="">请选择</option>
                            </select>
                            <input ng-hide="isShow" type="text" class="form-control input-sm" ng-model="dispatchOfficerName" required name="dispatchOfficerName" id="dispatchOfficerName" ng-disabled="dispatchOfficerDis">
                        </div>
                        <button class="btn btn-sm btn-default btn-addon" ng-click="changeDispatch()" ng-show="payHide" id="changeDispatch"><i class="fa fa-refresh"></i>变换</button>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-1 pull-left control-label">客户单位<span class="text-danger">*</span></label>
                        <label class="col-lg-2 control-label text-left">{{clientName}}</label>
                        <label class="w-s pull-left control-label">发货计划人<span class="text-danger">*</span></label>
                        <label class="col-lg-2 control-label text-left">{{consignorName}}</label>
                        <label class="w-s pull-left control-label m-l-n-md">发货人电话<span class="text-danger">*</span></label>
                        <label class="col-lg-2 control-label text-left">{{consignorPhone}}</label>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-1 pull-left control-label">总询价内容</label>
                        <div class="col-lg-10 pull-left control-label">
                            <textarea class="form-control input-sm" ng-model="content" placeholder="请填写总询价内容" name="content" id="content" ng-disabled="payDisable"></textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="panel-heading font-bold m-b-sm">
                            线路信息
                        </div>
                        <label class="col-lg-1 pull-left control-label">发货地址<span class="text-danger">*</span></label>
                        <div class="col-lg-3">
                            <input type="text" class="form-control input-sm" id="startAddressStr" name="startAddressStr" ng-model="startAddressStr" placeholder="请填写详细地址" required name="startAddressStr" ng-disabled="payDisable">
                        </div>
                        <div class="line  pull-in"></div>
                        <label class="col-lg-1 pull-left control-label">送货地址<span class="text-danger">*</span></label>
                        <div class="col-lg-3 ">
                            <input type="text" class="form-control   input-sm" ng-model="endAddressStr" required name="endAddressStr" id="endAddressStr" ng-disabled="payDisable">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-1 pull-left control-label">预计发货时间<span class="text-danger">*</span></label>
                        <div class="col-lg-3">
                            <div class="input-group input-group-sm date">
                                <input id="dataTime" name="dataTime" datetimepicker plugintype="datetime" ng-model="plannedArrivalTime" placeholder="预计发货时间" class="form-control" type="text" ng-disabled="payDisable" />
                                <span class="input-group-addon">
                                    <span class="glyphicon glyphicon-calendar"></span>
                                </span>
                            </div>
                        </div>
                        <label class="w-s pull-left control-label">预计到货时间<span class="text-danger">*</span></label>
                        <div class="col-lg-3">
                            <div class="input-group input-group-sm date">
                                <input id="dataTimeEnd" name="dataTimeEnd" datetimepicker plugintype="datetime" ng-model="plannedDeliveryTime" placeholder="结束时间" class="form-control" type="text" ng-disabled="payDisable" />
                                <span class="input-group-addon">
                                    <span class="glyphicon glyphicon-calendar"></span>
                                </span>
                            </div>
                        </div>
                        <label class="w-s pull-left control-label">里程数<span class="text-danger">*</span></label>
                        <div class="col-lg-2">
                            <input type="text" class="form-control input-sm" ng-model="mileage" placeholder="请填写里程数" required name="mileage" id="mileage" mile-pattern="/^[+]?\d+\.?\d*$/" ng-disabled="dispatchOfficerDis">
                        </div>
                        <label class="control-label">公里</label>
                    </div>
                    <div class="form-group">
                        <div class="panel-heading font-bold m-b-sm">
                            货物信息
                        </div>
                        <label class="col-lg-1 pull-left control-label">货物类别<span class="text-danger">*</span></label>
                        <div class="col-lg-2">

                            <input type="text" class="form-control input-sm" ng-model="goodsTypeName" placeholder="请填写货物类别" required name="goodsTypeName" id="goodsTypeName" ng-disabled="payDisable">
                        </div>
                        <label class="w-s pull-left control-label">货物名称<span class="text-danger">*</span></label>
                        <div class="col-lg-2">

                            <input type="text" id="goods_name" class="form-control input-sm" ng-model="goodsName" placeholder="请填写货物名称" required name="goodsName" ng-disabled="payDisable">
                        </div>
                        <label class="w-s pull-left control-label">货物数量<span class="text-danger">*</span></label>
                        <div class="col-lg-2">
                            <input type="text" ng-pattern="/^[0-9]+(.[0-9]{1,4})?$/" class="form-control input-sm" ng-model="goodsQuantity" placeholder="请填写货物数量" required name="goodsQuantity" id="goodsQuantity" ng-disabled="payDisable">
                        </div>
                        <div class="col-lg-2 m-l-n-sm">
                            <select class="form-control input-sm" id="goodsQuantityUnit" ng-model="goodsQuantityUnit" name="goodsQuantityUnit" required ng-options="x.value as x.text for x in goodQuantityUnitDropDown" ng-disabled="payDisable">
                                <option value="">请选择</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="panel-heading font-bold m-b-sm">
                            所需车辆信息
                        </div>
                        <label class="col-lg-1 pull-left control-label">所需车型<span class="text-danger">*</span></label>
                        <div class="col-lg-2">
                            <select id="carType" class="form-control input-sm" ng-model="carType" name="carType" required ng-options="x.value as x.text for x in carTypeDropDown" ng-disabled="payDisable">
                                <option value="">请选择</option>
                            </select>
                        </div>
                        <label class="w-s pull-left control-label">所需车长<span class="text-danger">*</span></label>
                        <div class="col-lg-2">
                            <select id="carLength" class="form-control input-sm" ng-model="carLength" name="carLength" required ng-options="x.value as x.text for x in carLengthDropDown" ng-disabled="payDisable">
                                <option value="">请选择</option>
                            </select>
                        </div>
                        <label class="w-s pull-left control-label">承运方式<span class="text-danger">*</span></label>
                        <div class="col-lg-2">
                            <select class="form-control input-sm" ng-model="carrierCategory" name="carrierCategory" id="carrierCategory" required ng-options="x.value as x.text for x in carrierCategoryDropDown" ng-disabled="payDisable">
                                <option value="">请选择</option>
                            </select>
                        </div>
                        <label class="w-s pull-left control-label">装车效果</label>
                        <div class="col-lg-2">
                            <input type="text" class="form-control input-sm" ng-model="loadingEffect" required placeholder="请填写装车效果" name="loadingEffect" id="loadingEffect" ng-disabled="payDisable">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="panel-heading font-bold m-b-sm">
                            附件信息
                        </div>
                        <div class="wrapper-sm">
                            <table class="table bg-white-only b-a">
                                <thead>
                                    <tr>
                                        <th width="50%">名称</th>
                                        <th >大小</th>
                                        <th >进度</th>
                                        <th>状态</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr ng-repeat="item in driverUploader.queue">
                                        <td>
                                            <strong>{{item.fileName|| item.fileName }}</strong>
                                        </td>
                                        <td  nowrap>{{ item.fileSize/1024/1024|number:2 }} MB</td>
                                        <td >
                                            <div class="progress" style="margin-bottom: 0;">
                                                <div class="progress-bar" role="progressbar" ng-style="{ 'width': item.progress + '%' }"></div>
                                            </div>
                                        </td>
                                        <td class="text-center">
                                            <span ng-show="item.isSuccess"><i class="glyphicon glyphicon-ok"></i></span>
                                            <span ng-show="item.isCancel"><i class="glyphicon glyphicon-ban-circle"></i></span>
                                            <span ng-show="item.isError"><i class="glyphicon glyphicon-remove"></i></span>
                                        </td>
                                        <td nowrap>
                                            <button type="button" class="btn btn-primary btn-xs" ng-click="driverUploader.onDownload(item)" id="download">
                                                <span class="fa fa-cloud-download"></span> 下载
                                            </button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-1 pull-left control-label">备注</label>
                        <div class="col-lg-10">
                            <textarea class="form-control input-sm" ng-model="attachmentDetails" placeholder="请填写备注" name="attachmentDetails" id="attachmentDetails" ng-disabled="payDisable"></textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="panel-heading font-bold m-b-sm">
                            应付报价信息
                        </div>
                        <div class="form-group">
                            <label class="col-lg-1 pull-left control-label">应付单价<span class="text-danger">*</span></label>
                            <div class="col-lg-1">
                                <input type="text" ng-pattern="/^[0-9]+(\.[0-9]{1,2})?$/" class="form-control input-sm" id="payableQuotation" ng-model="payableQuotation" placeholder="请填写应付单价" required name="payableQuotation" ng-disabled="payInfoDis">
                            </div>
                            <div class="pull-left m-l-n-sm">
                                <select class="form-control input-sm" id="payableQuotationUnit" ng-model="payableQuotationUnit" name="payableQuotationUnit" ng-options="x.value as x.text for x in payableQuotationUnitDropDown" ng-disabled="payInfoDis" required>
                                    <option value="">请选择</option>
                                </select>
                            </div>
                            <label class="col-lg-2 pull-left control-label">应付说明（外付）<span class="text-danger">*</span></label>
                            <div class="col-lg-4">
                                <input type="text" class="form-control input-sm" id="payableQuotationDetails" ng-model="payableQuotationDetails" placeholder="请填写应付说明（外付）" required name="payableQuotationDetails" ng-disabled="payInfoDis">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-1 pull-left control-label">应付单价2</label>
                            <div class="col-lg-1">
                                <input type="text" ng-pattern="/^[0-9]+(\.[0-9]{1,2})?$/" class="form-control input-sm" id="payableQuotationTow" ng-model="payableQuotationTow" placeholder="请填写应付单价2" name="payableQuotationTow" ng-disabled="payInfoDis">
                            </div>
                            <div class="pull-left m-l-n-sm">
                                <select class="form-control input-sm" id="payableQuotationUnitTow" name="payableQuotationTow" ng-model="payableQuotationUnitTow" ng-options="x.value as x.text for x in payableQuotationUnitDropDown" ng-disabled="payInfoDis">
                                    <option value="">请选择</option>
                                </select>
                            </div>
                            <label class="col-lg-2 pull-left control-label">应付说明（外付）2</label>
                            <div class="col-lg-4">
                                <input type="text" class="form-control input-sm" id="payableQuotationDetailsTow" ng-model="payableQuotationDetailsTow" placeholder="请填写应付说明（外付）2" name="payableQuotationDetailsTow" ng-disabled="payInfoDis">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-1 pull-left control-label">应付单价3</label>
                            <div class="col-lg-1">
                                <input type="text" ng-pattern="/^[0-9]+(\.[0-9]{1,2})?$/" class="form-control input-sm" id="payableQuotationThree" ng-model="payableQuotationThree" placeholder="请填写应付单价3" name="payableQuotationThree" ng-disabled="payInfoDis">
                            </div>
                            <div class="pull-left m-l-n-sm">
                                <select class="form-control input-sm" id="payableQuotationUnitThree" name="payableQuotationThree" ng-model="payableQuotationUnitThree" ng-options="x.value as x.text for x in payableQuotationUnitDropDown" ng-disabled="payInfoDis">
                                    <option value="">请选择</option>
                                </select>
                            </div>
                            <label class="col-lg-2 pull-left control-label">应付说明（外付）3</label>
                            <div class="col-lg-4">
                                <input type="text" class="form-control input-sm" id="payableQuotationDetailsThree" ng-model="payableQuotationDetailsThree" placeholder="请填写应付说明（外付）3" name="payableQuotationDetailsThree" ng-disabled="payInfoDis">
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="panel-heading font-bold m-b-sm">
                            应付附件信息
                        </div>
                        
                            <div class=" m-l-xs" ng-if="name=='pay'">

                                <label class="pull-left m-l m-r">附件添加</label>
                                
                                <div class="col-md-3 form-group">
                                    <input id="inquiryAdd_payableAttachUploader" ng-disabled="payableAttachUploader.queue.length>9" name="payableAttachUploader" type="file" file-read uploader="payableAttachUploader" multiple />
                                </div>
                            </div>
                            <div class="wrapper-sm">
                                <div class="line  pull-in"></div>
                                <div class="wrapper-sm bg-light dk b-b m-b-xs hidden">
                                    <span class="">上传文件数: <b class="badge bg-info">{{ payableAttachUploader.queue.length }}</b></span>
                                </div>
                                <table class="table bg-white-only b-a" ng-if="payableAttachUploader.queue.length">
                                    <thead>
                                        <tr>
                                            <th width="50%">名称</th>
                                            <th >大小</th>
                                            <th >进度</th>
                                            <th>状态</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr ng-repeat="item in payableAttachUploader.queue">
                                            <td>
                                                <strong>{{ item.fileName}}</strong>
                                            </td>
                                            <td  nowrap>{{ item.fileSize/1024/1024|number:2 }} MB</td>
                                            <td >
                                                <div class="progress" style="margin-bottom: 0;">
                                                    <div class="progress-bar" role="progressbar" ng-style="{ 'width': item.progress + '%' }"></div>
                                                </div>
                                            </td>
                                            <td class="text-center">
                                                <span ng-show="item.isSuccess"><i class="glyphicon glyphicon-ok"></i></span>
                                                <span ng-show="item.isCancel"><i class="glyphicon glyphicon-ban-circle"></i></span>
                                                <span ng-show="item.isError"><i class="glyphicon glyphicon-remove"></i></span>
                                            </td>
                                            <td nowrap>
                                                <button id="inquiryAdd_download" class="btn btn-success btn-xs" ng-click="payableAttachUploader.onDownload(item)" ng-if="item.imgSrc">
                                                    <span class="glyphicon glyphicon-download"></span> 下载
                                                </button>
                                                <button id="inquiryAdd_upload" class="btn btn-success btn-xs" ng-click="payableAttachUploader.upload(item)" ng-if="!item.imgSrc">
                                                    <span class="glyphicon glyphicon-upload"></span> 上传
                                            </button>
                                                <button id="inquiryAdd_onDelete" class="btn btn-danger btn-xs" ng-click="payableAttachUploader.onDelete(item)"  ng-if="name=='pay'">
                                                    <span class="glyphicon glyphicon-trash"></span> 删除
                                                </button>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                       
                      
                          
                    </div>


                    <div class="form-group" ng-show="receiveHide">
                        <div class="panel-heading font-bold m-b-sm">
                            应收报价信息
                        </div>
                        <div class="form-group">
                            <label class="col-lg-1 pull-left control-label">应收单价<span class="text-danger">*</span></label>
                            <div class="col-lg-1">
                                <input type="text" ng-pattern="/^[0-9]+(\.[0-9]{1,2})?$/" class="form-control input-sm" id="receivableQuotation" ng-model="receivableQuotation" placeholder="请填写应收单价" required name="receivableQuotation" ng-disabled="receiveDisable">
                            </div>
                            <div class="pull-left m-l-n-sm">
                                <select class="form-control input-sm" id="receivableQuotationUnit" ng-model="receivableQuotationUnit" name="receivableQuotationUnit" ng-options="x.value as x.text for x in payableQuotationUnitDropDown" ng-disabled="receiveDisable" required>
                                    <option value="">请选择</option>
                                </select>
                            </div>
                            <label class="col-lg-2 pull-left control-label">应收说明（厂付）<span class="text-danger">*</span></label>
                            <div class="col-lg-4">
                                <input type="text" class="form-control input-sm" id="receivableQuotationDetails" ng-model="receivableQuotationDetails" placeholder="请填写应收说明（厂付）" required name="receivableQuotationDetails" ng-disabled="receiveDisable">
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="panel-heading font-bold m-b-sm">
                            备注信息
                        </div>
                        <label class="col-lg-1 pull-left control-label">备注</label>
                        <div class="col-lg-10">
                            <textarea class="form-control input-sm" ng-model="remarks" placeholder="请填写备注" name="remarks" id="remarks" ng-disabled="remarksDisable"></textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-1 pull-left control-label"></label>
                        <div class="col-lg-5">
                            <button class="pull-right-xs btn btn-sm btn-danger btn-addon" ng-click="returnPriceC()" id="returnPriceC" ng-disabled="priceDis" ng-show="returnPrice"><i class="fa fa-mail-reply"></i>退回报价</button>
                            <button class="pull-right-xs btn btn-sm btn-primary btn-addon" ng-click="returnOrderC()" id="returnOrderC" ng-disabled="orderDis" ng-show="returnOrder"><i class="fa fa-mail-reply"></i>退回下单</button>
                            <button class="pull-right-xs btn btn-sm btn-info btn-addon" ng-click="confirmC()" id="confirmC" ng-disabled="saveDis" ng-show="confirm"><i class="fa fa-check"></i>确定</button>
                            <button class="pull-right-xs btn btn-sm btn-danger btn-addon" ng-click="auditReturnC()" id="auditPassC" ng-disabled="returnDis" ng-show="auditReturn"><i class="fa fa-mail-reply"></i>审核退回</button>
                            <button class="pull-right-xs btn btn-sm btn-success btn-addon" ng-click="auditPassC()" id="auditPass" ng-disabled="passDis" ng-show="auditPass"><i class="fa fa-check"></i>审核通过</button>
                            <button class="pull-right-xs btn btn-sm btn-info btn-addon" ng-click="receivaSave()" id="receivaSave" ng-disabled="passDis" ng-show="auditPass"><i class="fa fa-save"></i>保存</button>
                            <button class="pull-right-xs btn btn-sm btn-success btn-addon" ng-click="winC()" id="winC" ng-disabled="winDis" ng-show="win"><i class="fa fa-check"></i>已中标</button>
                            <button class="pull-right-xs btn btn-sm btn-danger btn-addon" ng-click="loseC()" id="loseC" ng-disabled="loseDis" ng-show="lose"><i class="fa fa-circle-o"></i>未中标</button>
                            <button class="pull-right-xs btn btn-sm btn-info btn-addon" ng-click="pendingC()" id="pendingC" ng-disabled="pendingDis" ng-show="pending"><i class="fa fa-dot-circle-o"></i>中标待定</button>
                            <button class="pull-right-xs btn btn-sm btn-warning btn-addon" ng-click="cancelC()" id="cancelC"><i class="fa fa-times"></i>取消</button>
                            <button ui-sref="app.inquiry.inquiryManagent" class="pull-right-xs btn btn-sm btn-info btn-addon" ng-show="manageS" id="returnBack"><i class="fa fa-mail-reply"></i>返回</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>